import request from "@/request";
const VITE_NEED_DECRYPT = import.meta.env.VITE_NEED_DECRYPT;

/**
 * 查询城市树
 *
 * @param {Object} data 请求数据
 * @returns {Promise<Object>} 请求结果
 */
export const queryCityTree = (data) =>
  request({
    url: "/system/city/queryCityTree",
    method: "post",
    data,
    needDecrypt: VITE_NEED_DECRYPT,
  });

/**
 * 获取一级项目列表
 *
 * @param data 请求参数对象
 * @returns 返回请求结果
 */
export function getLevelProjectList(data) {
  return request({
    url: "/operation/level1project/queryPage",
    method: "post",
    data,
    needDecrypt: VITE_NEED_DECRYPT,
  });
}

/**
 * 获取二级项目列表
 *
 * @param data 请求参数对象
 * @returns 返回请求结果
 */
export function getLevel2ProjectList(data) {
  return request({
    url: "/operation/level2project/queryPage",
    method: "post",
    data,
    needDecrypt: VITE_NEED_DECRYPT,
  });
}


/**
 * 获取产品线
 *
 * @param data 请求数据
 * @returns 请求结果
 */
export function regionFinish(data) {
  return request({
    url: "/qualityEffective/invertedhookschedule/regionFinish",
    method: "post",
    data,
  });
}



/**
 * 获取部门树形结构数据
 *
 * @param params 请求参数
 * @returns 返回部门树形结构数据
 */
export function getDeptTree(params) {
	return request({
		url: '/system/department/info/infoTree',
		method: 'post',
		data: params,
	});
}